/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       clouds.vert
 * Author:     karooolek
 * Created on: 2010-01-06
 *
 **********************************************************************************************************************/
 
STRINGIZE(

varying vec2 position;

uniform float t;
uniform float height;
uniform float size;
uniform vec2 velocity;

void main()
{
    position = (height * gl_Vertex.xy - velocity * t) / size + vec2(0.5, 0.5);
    
    // transform vertex
    mat4 modelview = gl_ModelViewMatrix;
    modelview[3] = vec4(0.0, 0.0, 0.0, 1.0);
    gl_Position = gl_ProjectionMatrix * modelview * vec4(gl_Vertex.xyz, 1.0);
}

) // STRINGIZE
